<extend name="Public/base"/>

<block name="body">
    <div class="cf">
		<div class="fl">
            <a class="btn" href="{:U('Ad/editAdPosition')}">新 增</a>
            <button class="btn ajax-post confirm" url="{:U('Ad/del')}" target-form="ids">删 除</button>
        </div>
    </div>
        
        
    <div class="data-table table-striped">
           
            <table class="">
                <thead>
                    <tr >
                       <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                        <th>编号</th>
                        <th>广告位名称</th>
                        <th>标识</th> 
                        <th>所在模版</th>     
					    <th>创建时间</th>                 
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                <volist name="_list" id="data">
                    <tr class="pointer even" title="">
                        <td><input class="ids" type="checkbox" name="id[]" value="{$data.id}" /></td>
                        <td>{$data['id']}</td>
                        <td>{$data['title']}</td>
                        <td>{$data['name']}</td>
                        <td>
                        	<switch name="data.template">
                        		<case value="1">
                        			首页
                        		</case>
                        		<case value="2">
                        			商品详情页
                        		</case>
                        		<case value="3">
                        			文章详情页
                        		</case>
                        	</switch>
                        </td>	
                        <td>{:date('Y-m-d H:i:s',$data['create_time'])}</td>
                        <td>            
                            <a id="" href="{:U('Ad/editAdPosition',array('id'=>$data['id']))}" title="">编辑</a>
                            |
                            <a class="confirm ajax-get" href="{:U('Ad/delAdPosition?id='.$data['id'])}" title="删除">删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
				<td colspan="5" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
                </tbody>
            </table></div>
    <div class="page">
        {$_page}
    </div>
</block>
     

